<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Vue 模板</title>
  <script src="https://cdn.bootcss.com/vue/2.6.11/vue.min.js"></script>
  <style>
    .box {
      border: 1px solid red;
      margin-bottom: 50px;
      padding-bottom: 20px;
      padding-left: 10px;
    }
    .tip {
      color: red;
    }
  </style>
</head>
<body>
  <!-- 主控区域 -->
  <div id="app">
    <div class="box">
      <h3>v-if</h3>
      <p v-if="vif">vif 等于 真</p>
      <p v-else>vif 等于 假</p>
    </div>

    <div class="box">
      <h3>v-show</h3>
      <p v-if="vif1">v-if 的内容</p>
      <p v-show="vshow">
        v-show 的内容
      </p>
    </div>

    <div class="box">
      <h3>template</h3>
      <template v-show="vshow">
        <p> v-show</p>
      </template>

    </div>
  </div>
  
  <script>
    var vue = new Vue({
      el: "#app",
      data: {
        vif: true,
        vif1: false,
        vshow: true,
      }
    })
  </script>
</body>
</html>